
const path = require('path');
const Koa = require('koa');
const static = require('koa-static');
const koaBody = require('koa-body');
const compress = require('koa-compress');
const staticCache = require('koa-static-cache')

const app = new Koa();

app.use(compress({ threshold: 1024 }));
app.use(koaBody({ multipart: true }));
app.use(staticCache(path.join(__dirname, './build')));
app.use(static(path.join(__dirname, './build')));
app.listen('8888');

console.log(`http://localhost:8888`);